<html>
<head>
	<title>Excersise 6</title>
	<link href="styles/js-console.css" rel="stylesheet" />
</head>
<body>
	<div id="js-console"></div>
	<script src="scripts/js-console.js"></script>
	<script>

	var digits = new Array(4,2,25,14,12,21);
	var index;	
	function IsBiggerThanNeighbours(array, index)
	{
				jsConsole.write("Given array is: ");
	for(i=0;i<array.length;i++)
	{
			jsConsole.write(array[i]+ ", ");	
	}
	jsConsole.writeLine();
		if ((array[index]>digits[index-1])&&(array[index])>array[index+1])
		{
			jsConsole.writeLine("number " + array[2] + " is bigger than its neighbors");
		}
		else
		{
			jsConsole.writeLine("number " + array[2] + " is NOT bigger than its neighbors");
		}
		
	}	
	jsConsole.writeLine(IsBiggerThanNeighbours(digits, 2));
	</script>
</body>
</html>
